package com.daxia.bumall.web.controller.m;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.daxia.bumall.dto.ProductCategoryDTO;
import com.daxia.bumall.dto.api.ProductCategoryAPIDTO;
import com.daxia.bumall.dto.api.info.ProductCategoryInfoAPIDTO;
import com.daxia.bumall.support.MPage;

@Controller
@RequestMapping(value = "/m/productCategory", produces = "application/json;charset=UTF-8")
public class MProductCategoryController extends MBaseController {
    
    @ResponseBody
    @RequestMapping("list")
    public String list(ProductCategoryDTO dto, MPage page) throws Exception {
    
        List<ProductCategoryDTO> productCategoryDTOs = productCategoryService.find(dto, page);

        return toApiOutput(productCategoryDTOs, ProductCategoryAPIDTO.class, ProductCategoryInfoAPIDTO.class, page);
    }
    
}
